<?php !isset($user['avatar_url']) AND $user['avatar_url'] = ''; ?>

<!--{hook admin_header_nav_start.htm}-->

<div class="dashboard-header">
	<nav class="navbar navbar-expand-lg bg-white fixed-top">
		<a class="navbar-brand" href="index.html"><img style="height: 50px;" src="../view/img/Logo.jpg" /></a>
		<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
			<span class="navbar-toggler-icon"></span>
		</button>
		<div class="collapse navbar-collapse " id="navbarSupportedContent">
			<ul class="navbar-nav ml-auto navbar-right-top">
				<li class="nav-item dropdown">
					<a class="nav-link" href="<?php echo url('shop-'.$shopid) ?>">查看店铺</a>
				</li>
				<li class="nav-item dropdown nav-user">
					<a class="nav-link nav-user-img" href="#" id="navbarDropdownMenuLink2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><img src="<?php echo $user['avatar_url'];?>" alt="" class="user-avatar-md rounded-circle"></a>
					<div class="dropdown-menu dropdown-menu-right nav-user-dropdown" aria-labelledby="navbarDropdownMenuLink2">
						<div class="nav-user-info">
							<h5 class="mb-0 text-white nav-user-name"><?php echo $user['username']; ?></h5>
							<span class="status"></span><span class="ml-2"><?php echo $user['groupname'];?></span>
						</div>
						<a class="dropdown-item" href="#"><i class="fas fa-user mr-2"></i>用户</a>
						<a class="dropdown-item" href="#"><i class="fas fa-cog mr-2"></i>切换店铺</a>
						<a class="dropdown-item" href="#"><i class="fas fa-power-off mr-2"></i>退出登录</a>
					</div>
				</li>
			</ul>
		</div>
	</nav>
</div>
<!-- <div class="nav-left-sidebar sidebar-dark">
	<div class="menu-list">
		<a class="d-xl-none d-lg-none" href="#">Dashboard</a>
		<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
			<span class="navbar-toggler-icon"></span>
		</button>
		<div class="collapse navbar-collapse" id="navbarNav">
			<ul class="navbar-nav flex-column">
				<li class="nav-divider">
					Menu
				</li>
				<?php foreach ($menu as $k=>$v) { ?>
					<li class="sidebar-list-item">
						<a 
							href="<?php echo $v['url'];?>"
							class="sidebar-link text-muted"
							>
							<i class="<?php echo $v['icon'];?> mr-3 text-gray"></i>
							<span class="text-nowrap"><?php echo $v['text'];?></span>
						</a>
					</li>
				<?php  } ?>
			</ul>
		</div>
	</div>
</div> -->
<div class="nav-left-sidebar sidebar-dark">
	<div class="menu-list">
		<nav class="navbar navbar-expand-lg navbar-light">
			<a class="d-xl-none d-lg-none" href="#">Dashboard</a>
			<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
				<span class="navbar-toggler-icon"></span>
			</button>
			<div class="collapse navbar-collapse" id="navbarNav">
				<ul class="navbar-nav flex-column">
					<li class="nav-divider">
						菜单
					</li>
					<?php $i = 1; ?>
					<?php foreach ($menu as $k=>$v) { ?>
						<li class="nav-item">
							<a class="nav-link" href="<?php echo $v['url']; ?>">
								<i class="fa fa-fw <?php echo $v['icon'];?>"></i>
								<?php echo $v['text'];?>
							</a>
						</li>
						<?php $i += 1; ?>
					<?php  } ?>
				</ul>
			</div>
		</nav>
	</div>
</div>
<!--{hook admin_header_nav_footer.htm}-->